<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        span {
            display: inline-block;
            width: 30px;
            height: 30px;
            font-size: 20px;
            margin: 100px 700px;
        }
    </style>
</head>

<body>
    <span id="span">1</span>
</body>
<script>
    let span = document.getElementById("span");
    console.log(span.innerText);
    setInterval(function () {
        if (span.innerText > 0) {
            span.innerText++
        }
    }, 1000)
</script>

</html>